package problems.nbitparity;

import problems.Problem;
import ec.FitnessEvaluator;
import ec.Solution;
import ge.GESolution;

public class ParityProblem extends Problem {
	public static void main(String[] args) {
		Problem problem = new ParityProblem();
		problem.ec("data/parity8/", 30, 200, 500, 7, 25, 75, 10);
		problem.randomSearch("data/parity8/", 30, 200, 500);
	}

	@Override
	protected Solution createRandomSolution() {
		return new GESolution(1 + (int) (Math.random() * 150), 8, .001);
	}

	@Override
	public FitnessEvaluator getFitnessEvaluator() {
		return new ParityFitnessEvaluator(8, "src/problems/nbitparity/parity8.txt");
	}
}
